package com.wish.housing.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wish.housing.entity.MTenant;
import com.wish.housing.entity.tenant.PageMTenantRequestDTO;
import com.wish.housing.entity.tenant.PageMTenantResponseDTO;
import com.wish.housing.mapper.MTenantMapper;
import com.wish.housing.service.IMTenantService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xiaocui
 * @since 2022-03-28
 */
@Service
public class MTenantServiceImpl extends ServiceImpl<MTenantMapper, MTenant> implements IMTenantService {

    @Autowired
    private MTenantMapper mTenantMapper;

    @Override
    public IPage<PageMTenantResponseDTO> searchTenantManageList(IPage<PageMTenantResponseDTO> page, PageMTenantRequestDTO pageMTenantRequestDTO) {
        return mTenantMapper.searchMTenantPage(page, pageMTenantRequestDTO);
    }

    @Override
    public Long getTenantOne(Integer signType) {
        return mTenantMapper.getTenantOne(signType);
    }
}
